package com.rainyun.rd.entity;

import com.rainyun.rc.orm.annotation.PrimaryField;
import com.rainyun.rc.orm.annotation.ReferData;
import com.rainyun.rc.orm.annotation.ReferField;

/**玩家的狗,信息实体
 * 一个玩家可以有多条狗*/
public class DogInfo {

    //狗的名称
    @PrimaryField
    String name;

    //外键,代表主人
    @ReferField(to = PlayerInfo.class,field = "name")
    String owner;

    //查本字段用于连表后接收主人信息,一般情况null,也不作为本表的字段
    @ReferData(PlayerInfo.class)
    PlayerInfo owner_info;

    //年龄
    int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
